A utility class providing "infinite" masks, formed by bits, or booleans. More...
Public Member Functions | |
| InfiniteBitMask () | |
| InfiniteBitMask (const InfiniteBitMask &other) | |
| InfiniteBitMask (InfiniteBitMask &&other) | |
| ~InfiniteBitMask () | |
| void | setBit (unsigned int index, bool value) |
| void | clear () |
| bool | getBit (unsigned int index) const |
| unsigned int | getOrder () const |
| bool | checkSubPartEquality (const InfiniteBitMask &other, unsigned int begin, unsigned int end) const |
| std::vector< bool >::reference | operator[] (size_t index) |
| bool | operator[] (size_t index) const |
| bool | operator== (const InfiniteBitMask &other) const |
| bool | operator!= (const InfiniteBitMask &other) const |
| bool | operator< (const InfiniteBitMask &other) const |
| InfiniteBitMask & | operator= (const InfiniteBitMask &other) |
| InfiniteBitMask & | operator= (InfiniteBitMask &&other) |
A utility class providing "infinite" masks, formed by bits, or booleans.
| nkGraphics::InfiniteBitMask::InfiniteBitMask | ( | ) |
Default constructor.
| nkGraphics::InfiniteBitMask::InfiniteBitMask | ( | const InfiniteBitMask & | other | ) |
Copy constructor.
| nkGraphics::InfiniteBitMask::InfiniteBitMask | ( | InfiniteBitMask && | other | ) |
Move constructor.
| nkGraphics::InfiniteBitMask::~InfiniteBitMask | ( | ) |
Destructor.
| void nkGraphics::InfiniteBitMask::setBit | ( | unsigned int | index, |
| bool | value | ||
| ) |
Sets a bit value, at given index.
| index | The index of the bit to set. |
| value | The value to attach. |
| void nkGraphics::InfiniteBitMask::clear | ( | ) |
Clears the mask and make it empty again.
| bool nkGraphics::InfiniteBitMask::getBit | ( | unsigned int | index | ) | const |
| index | The index of the bit value to retrieve. |
| unsigned int nkGraphics::InfiniteBitMask::getOrder | ( | ) | const |
| bool nkGraphics::InfiniteBitMask::checkSubPartEquality | ( | const InfiniteBitMask & | other, |
| unsigned int | begin, | ||
| unsigned int | end | ||
| ) | const |
Allows to check sub parts for equality between two masks.
| other | The mask to check against. |
| begin | The first index to check within the masks. |
| end | The last index to check. |
| std::vector<bool>::reference nkGraphics::InfiniteBitMask::operator[] | ( | size_t | index | ) |
Access operator.
| index | The index of the bit to access. |
| bool nkGraphics::InfiniteBitMask::operator[] | ( | size_t | index | ) | const |
Const access operator.
| index | The index of the bit to access. |
| bool nkGraphics::InfiniteBitMask::operator== | ( | const InfiniteBitMask & | other | ) | const |
Comparison operator.
| other | The mask to compare with. |
| bool nkGraphics::InfiniteBitMask::operator!= | ( | const InfiniteBitMask & | other | ) | const |
Comparison operator.
| other | The mask to compare with. |
| bool nkGraphics::InfiniteBitMask::operator< | ( | const InfiniteBitMask & | other | ) | const |
Comparison operator.
| other | The mask to compare with. |
| InfiniteBitMask& nkGraphics::InfiniteBitMask::operator= | ( | const InfiniteBitMask & | other | ) |
Assignment operator.
| other | The mask to assign. |
| InfiniteBitMask& nkGraphics::InfiniteBitMask::operator= | ( | InfiniteBitMask && | other | ) |
Assignment operator.
| other | The mask to assign. |